<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<link href="admin/images/app.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<style>
html,body{
	overflow:hidden;
	background:#FBFBFB;
}

</style>
<!--{template common/header_simple_end}-->
<nav class="navbar navbar-default bs-navbar-default navbar-fixed-top" role="navigation" style="margin:0">
      <!--{template top}--> 
</nav>
<div class="bs-container clearfix" style="border-top:1px solid #FFF">
  <div class="bs-main-container">
   <div class="main-header" style="padding:0 10px;">
     <ul class="nav nav-pills nav-pills-bottomguide clearfix">
              <li <!--{if empty($ext) && empty($appid)}-->class="active"<!--{/if}-->><a href="{ADMINSCRIPT}?mod=app&op=extopen">全部</a></li>
              <!--{if $ext}-->
              <li class="active"><a href="{ADMINSCRIPT}?mod=app&op=extopen&ext=$ext">$ext</a></li>
              <!--{elseif $appid }-->
              <li class="active"><a href="{ADMINSCRIPT}?mod=app&op=extopen&appid=$appid">{eval echo $appdatas[$appid]['appname'];}</a></li>
              <!--{/if}-->
              <li class="pull-right">
              		<form name="search" action="{BASESCRIPT}" method="get">
                    <input type="hidden" name="mod" value="app" />
                    <input type="hidden" name="op" value="extopen" />
                    
                    <div class="input-group group-sm" style="width:180px;padding-top:2px">
                    <input name="ext"  type="text" value="$ext" class="form-control " placeholder="应用名称">
                    <a href="javascript:;" class="input-group-addon" onclick="this.parentNode.parentNode.submit()"><i class="glyphicon glyphicon-search"></i></a>
                    </div>
                    </form>
              </li>
       </ul>
    </div>
    <div class="main-content clearfix" style="border-top:1px solid #FFF">
     <form id="appform" name="appform" class="form-horizontal form-horizontal-left" action="{BASESCRIPT}?mod=app&op=extopen" method="post" >
        <input type="hidden" name="appsubmit" value="true" />
        <input type="hidden" name="formhash" value="{FORMHASH}" />
       <table class="table table-hover" >
              <thead>
                <tr>
                  <th width="60" style="text-align:center">默认</th>
                  <th><a href="{ADMINSCRIPT}?mod=app&op=extopen&ext=$ext&appid=$appid">排序</a></th>
                  <th><a href="{ADMINSCRIPT}?mod=app&op=extopen&s=ext">扩展名</a></th>
                  <th><a href="{ADMINSCRIPT}?mod=app&op=extopen&s=appid">应用名称</a></th>
                  
                </tr>
              </thead>
             
             <!--{loop $list $value}-->
                <tr>
                  <td width="60" style="text-align:center"><input type="checkbox" data-ext="$value[ext]" value="1" name="isdefault[{$value[extid]}]" <!--{if $value[isdefault]}--> checked="checked"<!--{/if}--> onclick="check_default(this)" /></td>
                  <td width="60"><input type="text" name="disp[{$value[extid]}]" class="form-control input-sm" value="$value[disp]" style="width:40px;" /></td>
                  <td><a href="{ADMINSCRIPT}?mod=app&op=extopen&ext=$value[ext]" >$value[ext]</a></td>
                  <td><a href="{ADMINSCRIPT}?mod=app&op=extopen&appid=$value[appid]"><img src="$value[appico]" />$value[appname]</a></td>
                  
                 
                </tr>
             <!--{/loop}-->
             <thead>
                 <td style="text-align:center"><input type="checkbox" title="全选" name="chkall" id="chkall"  onclick="checkAll('prefix', this.form, 'isdefault')"></td><td colspan="20">
                 <input type="submit" class="btn btn-primary" value="提交" />$multi</td>
             </thead>
            </table>
          </form>
      <div class="tip" style="margin:20px;color:#444;text-shadow:1px 1px 1px #FFF;line-height:1.8">
        <div class="alert alert-warning">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            <h5><b>提示信息</b></h5>
            <ul>
                <li>排序：值越大越靠后</li>
                <li>可以点击列表标题，按扩展名或应用名称排序</li>
                <li>点击具体的扩展名或应用名称，可以单独列出相关的条目</li>
                <li>排序的值只对同一扩展名有效</li>
                <li>设置默认时，同一扩展名下只能设置一个应用为默认</li>
                <li>设置的默认应用，只有在用户位设置默认时有效，一旦用户手动设置了默认，将以用户设置的为准</li>
            </ul>
        </div>
    </div>
    </div>
  </div>
</div>
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
function check_default(obj){
	if(jQuery(obj).prop('checked')){
		jQuery('input[data-ext='+jQuery(obj).data('ext')+']').not(obj).prop('checked',false);
	}
}
</script> 
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script> 
<!--{template common/footer_simple}-->
